#define _CRT_SECURE_NO_WARNINGS 1
#include "SeqList.h"

void TestSeqList1()
{
	struct SeqList s1;
	SLInit(&s1);
	SLPushBack(&s1, 1);
	SLPushBack(&s1, 2);
	SLPushBack(&s1, 3);
	SLPushBack(&s1, 4);
	SLPushBack(&s1, 5);

	SLPrint(&s1);

	SLPopBack(&s1);

	SLPrint(&s1);

	SLPushFront(&s1, 1);
	SLPushFront(&s1, 2);
	SLPushFront(&s1, 3);
	SLPushFront(&s1, 4);
	SLPushFront(&s1, 5);

	SLPrint(&s1);

	SLPopFront(&s1);
	SLPopFront(&s1);

	SLPrint(&s1);

	SLInsert(&s1, 2, 20);

	SLPrint(&s1);

	SLErase(&s1, 2);

	SLPrint(&s1);

	int pos = SLFind(&s1, 3, 0);
	while (pos != -1)
	{
		SLErase(&s1, pos);
		pos = SLFind(&s1, 3, pos);
	}
	SLPrint(&s1);



	SLDestroy(&s1);
}




int main()
{
	TestSeqList1();

	return 0;
}